import touchStart from './touchStart.js'
export default class touchMove{
  constructor(startX1,startY1) {
    this.startX1 = startX1
    this.startY1 = startY1
    this.ctx = wx.createContext()
  }
  touchMove () {
    this.ctx.beginPath()
    this.ctx.setLineCap('round')
    this.ctx.moveTo(touchStart.startX,touchStart.startY)
    this.ctx.lineTo(this.startX1,this.startY1)
    this.ctx.stroke()
    touchStart.setStart(this.startX1,this.startY1)
    wx.drawCanvas({
      canvasId: 'mycanvas',
      reserve: true,
      actions: this.ctx.getActions() // 获取绘图动作数组
    })
  }
}
